﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Coldairarrow.Entity.Interface
{
    /// <summary>
    /// 易仓库存信息
    /// </summary>
    /// 

    public class ProInvDTO
    {
        public string code { get; set; }
        public string message { get; set; }
        public string requestId { get; set; }
        public long timestamp { get; set; }
        public string version { get; set; }
        public string nonce_str { get; set; }
        public string sign_type { get; set; }
        public string sign { get; set; }
        public string biz_content { get; set; }

    }


    public class ProInvDTO_Data
    {
        public string total { get; set; }
        public string pi_id { get; set; }
        public int page { get; set; }
        public int page_size { get; set; }
        public List<ProInv> data { get; set; }
    }

    public class ProInv
    {
        public string ID { get; set; }
        public string RowId { get; set; }

        /// <summary>
        /// 产品SKU代码
        /// </summary>
        public string product_sku { get; set; }

        /// <summary>
        /// 产品中文名称
        /// </summary>
        public string product_title { get; set; }
        /// <summary>
        /// 产品英文名称
        /// </summary>
        public string product_title_en { get; set; }
        /// <summary>
        /// 产品重量(Kg)
        /// </summary>
        public string product_weight { get; set; }

        /// <summary>
        /// 仓库Id	
        /// </summary>
        public string warehouse_id { get; set; }
        /// <summary>
        /// 仓库代码	
        /// </summary>
        public string warehouse_code { get; set; }
        /// <summary>
        /// 仓库名称	
        /// </summary>
        public string warehouse_name { get; set; }
        /// <summary>
        /// 产品销售状态Id	
        /// </summary>
        private string _sale_status;
        public string sale_status 
        {
            get { return _sale_status; }

            set 
            {
                if (value == "1") _sale_status = "清货待下架";
                else if (value == "2") _sale_status = "在线产品";
                else  _sale_status = value;
            }
        }
        /// <summary>
        /// 采购在途数量	
        /// </summary>
        public decimal pi_purchase_onway_qty { get; set; }

        /// <summary>
        /// 退件在途数量	
        /// </summary>
        public decimal pi_return_onway_qty { get; set; }

        /// <summary>
        /// 待上架数量	
        /// </summary>
        public decimal pi_pending_qty { get; set; }

        /// <summary>
        /// 可用数量	
        /// </summary>
        public decimal pi_in_used_qty { get; set; }

        /// <summary>
        /// 预警数量	
        /// </summary>
        public decimal pi_warning_qty { get; set; }

        /// <summary>
        /// 可销数量	
        /// </summary>
        public decimal pi_sellable_qty { get; set; }

        /// <summary>
        /// 分销数量	
        /// </summary>
        public decimal pi_shared_qty { get; set; }

        /// <summary>
        /// 可售天数	
        /// </summary>
        public decimal pi_can_sale_days { get; set; }

        /// <summary>
        /// 待出数量	
        /// </summary>
        public decimal pi_reserved_qty { get; set; }

        /// <summary>
        /// 缺货数量	
        /// </summary>
        public decimal pi_no_stock_qty { get; set; }
        /// <summary>
        /// 缺货天数	
        /// </summary>
        public decimal pi_no_stock_days { get; set; }
        /// <summary>
        /// 不良品数量	
        /// </summary>
        public decimal pi_unsellable_qty { get; set; }
        /// <summary>
        /// 待出不良品数量	
        /// </summary>
        public decimal pi_outbound_qty { get; set; }
        /// <summary>
        /// 库存成本	
        /// </summary>
        public decimal inventory_cost { get; set; }
        /// <summary>
        /// 币种	
        /// </summary>
        public string currency_code { get; set; }
        /// <summary>
        /// 最后更新时间	
        /// </summary>
        public string pi_update_time { get; set; }
        /// <summary>
        /// 实际可用库存	
        /// </summary>
        public decimal actual_usable_inventory_qty { get; set; }
        /// <summary>
        /// 计划库存数量	
        /// </summary>
        public decimal pi_planned_qty { get; set; }
        /// <summary>
        /// 采购库存数量	
        /// </summary>
        public decimal purchase_quantity { get; set; }

        /// <summary>
        /// FNSKU	
        /// </summary>
        public string FNSKU { get; set; }


    }
}
